

# def add_name(a,b,de="+"):
#     if de=='+':
#         num=a+b
#         return num
#     elif de=="-":
#         num=a-b
#         return num
#     elif de=="*":
#         num=a*b
#         return num
#     elif de=="/":
#
#         if b==0:
#             print('除数不能为0')
#             return None
#         else:
#             return a/b
# sum=add_name(3,0,"/")
# print(sum)

# num=1
# def add_n(nums):
#     num=nums
#     return nums
# # print(num)
# a=add_n(10)
# print(a)

#lambda 表达式
# r=5
# area=lambda r:r*5
# print(area(r))

#递归调用
#猴子有一堆桃子，每天吃一半多一个 剩下一个桃子


# def sum_peach(days):
#     total=1
#     for _ in range(1,days):
#         total=(total+1)*2
#     return total

# def sum_peach(days):
#     if days==1: #停止递归的条件
#         return 1
#     else:
#         return ((sum_peach(days-1)+1))*2
# day=2
# sum=sum_peach(day)
# print('前面第{}天有{}个桃子'.format(day,sum))

